package com.example.commen.view

import androidx.fragment.app.FragmentManager
import com.blankj.utilcode.util.NetworkUtils
import com.blankj.utilcode.util.ScreenUtils
import com.example.commen.base.BaseBottomSheetFrag
import com.example.commen.databinding.NoNetLayoutBinding
import com.example.commen.utile.SingleClick
import com.hjq.toast.Toaster

/**
 * @author zyju
 * @date 2024/4/10 11:53
 */
class NetWorkDialog:BaseBottomSheetFrag() {
    private lateinit var binding: NoNetLayoutBinding

    override fun getLayoutHeight(): Int {
        return ScreenUtils.getScreenHeight()-1
    }

    override fun getLayoutResId(): Int {
       return com.example.commen.R.layout.no_net_layout
    }


    override fun initView() {
        binding = NoNetLayoutBinding.bind(rootView)
        SingleClick(binding.root){
            if(NetworkUtils.isConnected()){
                dismiss()
            }else{
                 Toaster.show("网络连接失败")
            }
        }
    }

    override fun getisDraggable(): Boolean {
        return false
    }

}